#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <stdio.h>
#include <stdlib.h>
#include <sys/ioctl.h>
#include <fcntl.h>
#include <time.h>
#include "dht_data.h"

//déclaration des fonctions IOCTL
#define IOCTL_STREAMON      0x30
#define IOCTL_STREAMOFF     0x40
#define IOCTL_GRAB          0x50

#define DEFAULT_FILE_NAME   "test.jpg"
#define DEFAULT_DRIVER_NAME "/dev/USBDriva0"

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT
    
public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();
    
private:
    Ui::MainWindow *ui;
    int DriverFile;
    void enableButtons();
    void disableButtons();
    void waitSec(unsigned int sec);
    void displayPic();

private slots:
  void on_PushButtonOpen_clicked();
  void on_PushButtonClose_clicked();
  void on_pushButtonQuit_clicked();
  void on_PushButtonStreamOn_clicked();
  void on_PushButtonStreamOff_clicked();
  //void on_PushButtonSet_clicked();
  //void on_PushButtonGet_clicked();
  void on_PushButtonGrab_clicked();
  void on_PushButtonRead_clicked();
  void on_PushButtonTakePic_clicked();
  void on_PushButtonSetGet_clicked();
  void on_PushButtonPanTilt_clicked();
  void on_PushButtonLoadFile_clicked();
  //void on_Push_clicked();
};

#endif // MAINWINDOW_H
